# -*- coding: utf-8 -*-


import time, functools

def metric(fn):

    @functools.wraps(fn)  

    def wrapper(*args, **kw):

        start_time=time.time()
        end_time=time.time()

        print('耗时：{:.4f}s'.format(end_time - start_time))  # 打印执行耗时
        return fn(*args, **kw)
    
    return wrapper